package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface PurchaseMapper {

    List<Supplier> supplierComboboxList(@Param("q") String q);

    void savePurchaseList(@Param("purchaseList") PurchaseList purchaseList);

    PurchaseList getPurchaseListByPNumber(@Param("purchaseNumber") String purchaseNumber);

    void savePurchaseListGoods(@Param("list") List<PurchaseListGoods> list);

    void saveReturnList(@Param("returnList") ReturnList returnList);

    ReturnList getReturnListByPNumber(@Param("returnNumber")String returnNumber);

    void saveReturnListGoods(@Param("list")List<ReturnListGoods> list);

    List<PurchaseList> searchPurchaseListGoods(@Param("purchaseNumber") String purchaseNumber, @Param("supplierId")Integer supplierId, @Param("state")Integer state, @Param("sTime")String sTime, @Param("eTime")String eTime);

    List<PurchaseListGoods> purchaseListGoodsGetGoodss(@Param("purchaseListId") Integer purchaseListId);

    void delPurchaseListGoods(@Param("purchaseListId") Integer purchaseListId);

    List<ReturnList> searchReturnListGoods(@Param("returnNumber")String returnNumber, @Param("supplierId")Integer supplierId, @Param("state")Integer state, @Param("sTime")String sTime, @Param("eTime")String eTime);

    List<ReturnListGoods> returnListGoodsGetGoodss(@Param("returnListId") Integer returnListId);

    void delReturnListGoods(@Param("returnListId") Integer returnListId);

    void delReturnList(@Param("returnListId")Integer returnListId);

    void delPurchaseList(@Param("purchaseListId")Integer purchaseListId);

    void updateState(Integer purchaseListId);

    List<Map> count(@Param("sTime") String sTime, @Param("eTime")String eTime, @Param("goodsTypeId")Integer goodsTypeId, @Param("codeOrName")String codeOrName);
}
